﻿using System;
using BusinessObjects.BusinessRules;
namespace BusinessObjects.BussinessDictionary
{
    /// <summary>
    /// FixedAsset Entity
    /// </summary>
    public class FixedAsset : BusinessObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="FixedAsset"/> class.
        /// </summary>
        public FixedAsset()
        {
            AddRule(new ValidateRequired("FixedAssetCode"));
            AddRule(new ValidateRequired("FixedAssetName"));
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="FixedAsset"/> class.
        /// </summary>
        /// <param name="fixedAssetId">The fixed asset identifier.</param>
        /// <param name="fixedAssetCode">The fixed asset code.</param>
        /// <param name="fixedAssetName">Name of the fixed asset.</param>
        /// <param name="fixedAssetForeignName">The fixed asset name en.</param>
        /// <param name="fixedAssetCategoryId">The fixed asset category identifier.</param>
        /// <param name="state">The state.</param>
        /// <param name="description">The description.</param>
        /// <param name="productionYear">The production year.</param>
        /// <param name="madeIn">The made in.</param>
        /// <param name="purchasedDate">The purchased date.</param>
        /// <param name="usedDate">The used date.</param>
        /// <param name="depreciationDate">The depreciation date.</param>
        /// <param name="incrementDate">The increment date.</param>
        /// <param name="disposedDate">The disposed date.</param>
        /// <param name="unit">The unit.</param>
        /// <param name="serialNumber">The serial number.</param>
        /// <param name="accessories">The accessories.</param>
        /// <param name="quantity">The quantity.</param>
        /// <param name="unitPrice">The unit price.</param>
        /// <param name="orgPrice">The org price.</param>
        /// <param name="accumDepreciationAmount">The accum depreciation amount.</param>
        /// <param name="remainingAmount">The remaining amount.</param>
        /// <param name="annualDepreciationAmount">The annual depreciation amount.</param>
        /// <param name="lifeTime">The life time.</param>
        /// <param name="depreciationRate">The depreciation rate.</param>
        /// <param name="orgPriceAccountCode">The org price account.</param>
        /// <param name="depreciationAccountCode">The depreciation account.</param>
        /// <param name="capitalAccountCode">The capital account.</param>
        /// <param name="departmentId">The department identifier.</param>
        /// <param name="employeeId">The employee identifier.</param>
        /// <param name="isActive">if set to <c>true</c> [is active].</param>
        public FixedAsset(int fixedAssetId, string fixedAssetCode, string fixedAssetName, int fixedAssetCategoryId,
            int state, string description, int productionYear, string madeIn, DateTime purchasedDate, DateTime usedDate, DateTime depreciationDate,
            DateTime incrementDate, DateTime disposedDate, string unit, string serialNumber, string accessories, int quantity, decimal unitPrice,
            decimal orgPrice, decimal accumDepreciationAmount, decimal remainingAmount, decimal annualDepreciationAmount, decimal lifeTime, decimal depreciationRate, string orgPriceAccountCode, string depreciationAccountCode,
            string capitalAccountCode, int departmentId, int employeeId, bool isActive, string expenseAccountCode, string capitalMoneyAccountCode, long unitId)
            : this()
        {
            FixedAssetId = fixedAssetId;
            FixedAssetCode = fixedAssetCode;
            FixedAssetName = fixedAssetName;
            FixedAssetCategoryId = fixedAssetCategoryId;
            State = state;
            Description = description;
            ProductionYear = productionYear;
            MadeIn = madeIn;
            PurchasedDate = purchasedDate;
            UsedDate = usedDate;
            DepreciationDate = depreciationDate;
            IncrementDate = incrementDate;
            DisposedDate = disposedDate;
            Unit = unit;
            SerialNumber = serialNumber;
            Accessories = accessories;
            Quantity = quantity;
            UnitPrice = unitPrice;
            OrgPrice = orgPrice;
            AccumDepreciationAmount = accumDepreciationAmount;
            RemainingAmount = remainingAmount;
            AnnualDepreciationAmount = annualDepreciationAmount;
            LifeTime = lifeTime;
            DepreciationRate = depreciationRate;
            OrgPriceAccountCode = orgPriceAccountCode;
            DepreciationAccountCode = depreciationAccountCode;
            CapitalAccountCode = capitalAccountCode;
            ExpenseAccountCode = expenseAccountCode;
            CapitalMoneyAccountCode = capitalMoneyAccountCode;
            DepartmentId = departmentId;
            EmployeeId = employeeId;
            IsActive = isActive;
            UnitId = unitId;
        }

        /// <summary>
        /// Gets or sets the fixed asset identifier.
        /// </summary>
        /// <value>
        /// The fixed asset identifier.
        /// </value>
        public long FixedAssetId { get; set; }

        /// <summary>
        /// Gets or sets the fixed asset code.
        /// </summary>
        /// <value>
        /// The fixed asset code.
        /// </value>
        public string FixedAssetCode { get; set; }

        /// <summary>
        /// Gets or sets the name of the fixed asset.
        /// </summary>
        /// <value>
        /// The name of the fixed asset.
        /// </value>
        public string FixedAssetName { get; set; }

        /// <summary>
        /// Gets or sets the fixed asset category identifier.
        /// </summary>
        /// <value>
        /// The fixed asset category identifier.
        /// </value>
        public long FixedAssetCategoryId { get; set; }

        /// <summary>
        /// Gets or sets the state.
        /// </summary>
        /// <value>
        /// The state.
        /// </value>
        public int State { get; set; }

        /// <summary>
        /// Gets or sets the description.
        /// </summary>
        /// <value>
        /// The description.
        /// </value>
        public string Description { get; set; }

        /// <summary>
        /// Gets or sets the production year.
        /// </summary>
        /// <value>
        /// The production year.
        /// </value>
        public int ProductionYear { get; set; }

        /// <summary>
        /// Gets or sets the made in.
        /// </summary>
        /// <value>
        /// The made in.
        /// </value>
        public string MadeIn { get; set; }

        /// <summary>
        /// Gets or sets the purchased date.
        /// </summary>
        /// <value>
        /// The purchased date.
        /// </value>
        public DateTime PurchasedDate { get; set; }

        /// <summary>
        /// Gets or sets the used date.
        /// </summary>
        /// <value>
        /// The used date.
        /// </value>
        public DateTime UsedDate { get; set; }

        /// <summary>
        /// Gets or sets the depreciation date.
        /// </summary>
        /// <value>
        /// The depreciation date.
        /// </value>
        public DateTime DepreciationDate { get; set; }

        /// <summary>
        /// Gets or sets the increment date.
        /// </summary>
        /// <value>
        /// The increment date.
        /// </value>
        public DateTime IncrementDate { get; set; }

        /// <summary>
        /// Gets or sets the disposed date.
        /// </summary>
        /// <value>
        /// The disposed date.
        /// </value>
        public DateTime DisposedDate { get; set; }

        /// <summary>
        /// Gets or sets the unit.
        /// </summary>
        /// <value>
        /// The unit.
        /// </value>
        public string Unit { get; set; }

        /// <summary>
        /// Gets or sets the serial number.
        /// </summary>
        /// <value>
        /// The serial number.
        /// </value>
        public string SerialNumber { get; set; }

        /// <summary>
        /// Gets or sets the accessories.
        /// </summary>
        /// <value>
        /// The accessories.
        /// </value>
        public string Accessories { get; set; }

        /// <summary>
        /// Gets or sets the quantity.
        /// </summary>
        /// <value>
        /// The quantity.
        /// </value>
        public int Quantity { get; set; }

        /// <summary>
        /// Gets or sets the unit price.
        /// </summary>
        /// <value>
        /// The unit price.
        /// </value>
        public decimal UnitPrice { get; set; }

        /// <summary>
        /// Gets or sets the org price.
        /// </summary>
        /// <value>
        /// The org price.
        /// </value>
        public decimal OrgPrice { get; set; }

        /// <summary>
        /// Gets or sets the accum depreciation amount.
        /// </summary>
        /// <value>
        /// The accum depreciation amount.
        /// </value>
        public decimal AccumDepreciationAmount { get; set; }

        /// <summary>
        /// Gets or sets the remaining amount.
        /// </summary>
        /// <value>
        /// The remaining amount.
        /// </value>
        public decimal RemainingAmount { get; set; }

        /// <summary>
        /// Gets or sets the annual depreciation amount.
        /// </summary>
        /// <value>
        /// The annual depreciation amount.
        /// </value>
        public decimal AnnualDepreciationAmount { get; set; }

        /// <summary>
        /// Gets or sets the life time.
        /// </summary>
        /// <value>
        /// The life time.
        /// </value>
        public decimal LifeTime { get; set; }

        /// <summary>
        /// Gets or sets the depreciation rate.
        /// </summary>
        /// <value>
        /// The depreciation rate.
        /// </value>
        public decimal DepreciationRate { get; set; }

        /// <summary>
        /// Gets or sets the org price account.
        /// </summary>
        /// <value>
        /// The org price account.
        /// </value>
        public string OrgPriceAccountCode { get; set; }

        /// <summary>
        /// Gets or sets the depreciation account.
        /// </summary>
        /// <value>
        /// The depreciation account.
        /// </value>
        public string DepreciationAccountCode { get; set; }

        /// <summary>
        /// Gets or sets the capital account.
        /// </summary>
        /// <value>
        /// The capital account.
        /// </value>
        public string CapitalAccountCode { get; set; }
        /// <summary>
        /// Gets or sets the depreciation account.
        /// </summary>
        /// <value>
        /// The depreciation account.
        /// </value>
        public string ExpenseAccountCode { get; set; }

        /// <summary>
        /// Gets or sets the capital account.
        /// </summary>
        /// <value>
        /// The capital account.
        /// </value>
        public string CapitalMoneyAccountCode { get; set; }

        /// <summary>
        /// Gets or sets the department identifier.
        /// </summary>
        /// <value>
        /// The department identifier.
        /// </value>
        public long DepartmentId { get; set; }

        /// <summary>
        /// Gets or sets the employee identifier.
        /// </summary>
        /// <value>
        /// The employee identifier.
        /// </value>
        public long EmployeeId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether [is active].
        /// </summary>
        /// <value>
        ///   <c>true</c> if [is active]; otherwise, <c>false</c>.
        /// </value>
        public bool IsActive { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether [is active].
        /// </summary>
        /// <value>
        ///   <c>true</c> if [is active]; otherwise, <c>false</c>.
        /// </value>
        public long UnitId { get; set; }
    }
}
